import 'package:flutter/material.dart';
//import 'package:flutter_webView_plugin/f';
//需要添加依赖包https://blog.csdn.net/yechaoa/article/details/90175271
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
import 'loading.dart';
import 'app.dart';
void main() => runApp(MaterialApp(
  debugShowCheckedModeBanner: false,
  title: 'flutter企业站',
  //自定义主题
  theme: mDefaultTheme,
  //路由
  routes: <String,WidgetBuilder>{
    "app": (BuildContext context) =>App(),
      "company_info" : (BuildContext context) =>WebviewScaffold(
        url: "https://www.baidu.com",
        appBar: AppBar(
          title: Text('公司介绍'),
          leading: IconButton(
            icon: Icon(Icons.home),
            onPressed:(){
              //跳转到主界面
              Navigator.of(context).pushReplacementNamed('app');
            }
          ),
        ),
      )
    },
    home: LoadingPage(),

));
/**
 * 自定义主题
 */
final ThemeData mDefaultTheme=ThemeData(
  primaryColor: Colors.redAccent,
);